import historyRouter from './historyRouter.js';
import hashRouter from './hashRouter.js';

export default class Router{
    constructor({mode = 'hash', routerlist}) {
        this.router = mode === 'history' ? new historyRouter(routerlist) : new hashRouter(routerlist);
    }
    
    push(path) {
        this.router.push(path);
    }
    replace(path) {
        this.router.replace(path);
    }
}